<template>
  <view>
    <view>
      <!-- #ifdef MP-WEIXIN -->
      <!-- <image :src=""></image> -->
      <img src="https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132" 
      alt="微信用户" class="userImage" @click="getUserInfo" v-if="store.$state.userInfo.avatarUrl === ''"/>

      <img :src="/*userInfo1.avatarUrl*/store.$state.userInfo.avatarUrl" alt="用户头像" v-else class="userImage" @click="goToUserMeg"/>
      <text v-if="store.$state.userInfo.nickName === ''">未登录</text>
      <text v-else>{{/*userInfo1.nickName*/store.$state.userInfo.nickName}}</text><br>
      <text>{{store.num1}}</text>
      <button @click="store.num1++" size="mini" type="primary">num1++</button>
      <!-- #endif -->
    </view>
  </view>
</template>

<script setup lang="ts">
//ifdef MP-WEIXIN
import {mainStore} from '../../store'
import {userInfo1,getUserInfo,goToUserMeg} from '../../hooks/useIndex'
const store = mainStore()
//endif 
</script>

<style lang="less" scoped>
// @import '../../less/index.less'
.userImage{
  width: 150rpx;
  height: 150rpx;
  border-radius: 50%;
}
</style>
